package com.xiaoyu.cloudmusic.dao;

import com.xiaoyu.cloudmusic.pojo.*;
import com.xiaoyu.cloudmusic.resp.PlayList;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PlaylistMapper {
    public List<Recommend> getRandRecommend(int num);
    public PlayListDetail getPlayListDetail(int id);
    public List<Song> getPlayListSong(int id);
    public PlayListDetail getLastPlayListDetail();
    public int addPlayList(@Param("uuid") String uuid,@Param("id") int id,@Param("title") String title,@Param("createTime") String createTime,@Param("isPublic") String isPublic);
    public int updateMyPlayList(PlayListDetail playListDetail);//注意，这里只更新name，describe，tag那三个字段
    public int updateCover(@Param("coverImgUrl") String coverImgUrl,@Param("listId") String listId);
    public int deletePlaylistById(int id);

    //下面是进行的重构……
    public int delPlayListTracksByListId(int listId);
    public int addSongByID(int musicId,int playlistId );
    public int deleteSongByID(int musicId,int playlistId );
    public Playlisttrack findTrackInList(int musicId, int playlistId);
    public int addRecommend(Recommend recommend);
    public int updateRecommend(Recommend recommend);
    public void delRecommend(int id);
    public int addComment(CommentInfo commentInfo);
    public int addReply(CommentInfo commentInfo);
    public List<CommentInfo> getFirstComment(int listId);
    public List<CommentInfo> getReply(int listId);
    public int delComment(int id);
    public int supportComment(int id);
    public int noSupportComment(int id);
    public List<PlayList> getUserPublicList(String uuid);
    public int addFavorites(@Param("uuid")String uuid,@Param("listid")Integer listid);
    public int removeFavorites(@Param("uuid")String uuid,@Param("listid")Integer listid);
    public List<PlayList> getUserFavorites(String uuid);
    public List<Integer> getIds(String uuid);
    public void addSupport(@Param("uuid")String uuid,@Param("commentid")Integer commentid);
    public void delSupport(@Param("uuid")String uuid,@Param("commentid")Integer commentid);
    public List<Integer> getFavoritesIds(String uuid);



}
